"""
当setattr方法为类Point和实例p1同时增加属性（变量）
"""

from Lab01 import Point

A = Point(4, 5)
a = Point(4, 5)

setattr(A, 'y', 10)
setattr(a, 'y', 10)

print('A dict is {}'.format(A.__dict__))
print('a dict is {}'.format(a.__dict__))
